Lecture Analysis: Large Language Models & Prompt Architecture
From Classical Logic to Probabilistic Generation
This AI Subsystem module of Week 7 marks the profound paradigm shift in computer science from classical deterministic execution to probabilistic machine learning algorithms and Large Language Models (LLMs).
- Deterministic Systems (C / Python Logic): In traditional systems like
speller, every structural execution step is strictly hardcoded via discrete data structures (hash tables, tries) to yield 100% deterministic output. - Large Language Models (LLM Mechanics): Grounded in deep neural networks trained across immense textual corpora, LLMs operate primarily via probabilistic mathematical predictions of the next optimal token (Next Token Prediction).
Prompt Architecture & System Constraints
- Prompt Engineering: Structuring input parameters systematically to guide the neural model, constricting the mathematical probability landscape to extract highly accurate and pertinent outputs.
- System Instructions (System Prompts): As demonstrated in the lecture file
chat3.py, system instructions enforce rigorous architectural and persona guardrails on the model, granting developers ultimate control over AI behavior before processing end-user input.
===================================================================================
LLM SYSTEM PROMPT EXECUTION FLOW
===================================================================================
[ System Instructions ] βββ
βββ> [ LLM Neural Engine (GPT-5) ] ββ> [ Filtered Token Output ]
[ User Raw Prompt ] βββ
===================================================================================